package com.adams.access.db.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 
 * 
 * File Name : ViewPanel.java
 * 
 * @Description : 页面面板实体
 */
@Entity
@Table(name = "T_VIEW_PANEL_INFO")
public class ViewPanel extends EntityObject
{

	private static final long serialVersionUID = 2856548993729641197L;

	private String tablecode;// 表定义编码

	private String width;// 宽

	private String height;// 高

	private Integer maxCols;// 最大列数

	private String labelWidth;

	private String title;

	private String type;// 类型
	public static String TYPE_GRID = "gridPanel";
	public static String TYPE_FORM = "formPanel";

	private String url;// 获取面板内容结构url

	private String action;

	private String storeUrl;// 表格来源数据url

	private String loadUrl;

	private boolean page;// 是否分页显示

	private Long viewwinid;// 页面窗口主键

	private String parentcolumn;// 与前表发生关系时使用的父级字段

	@Column(name = "TABLECODE")
	public String getTablecode()
	{
		return tablecode;
	}

	/**
	 * @param tablecode
	 *            the tablecode to set
	 */
	public void setTablecode(String tablecode)
	{
		this.tablecode = tablecode;
	}

	@Column(name = "WIDTH")
	public String getWidth()
	{
		return width;
	}

	public void setWidth(String width)
	{
		this.width = width;
	}

	@Column(name = "HEIGHT")
	public String getHeight()
	{
		return height;
	}

	public void setHeight(String height)
	{
		this.height = height;
	}

	@Column(name = "MAX_COLS")
	public Integer getMaxCols()
	{
		return maxCols;
	}

	public void setMaxCols(Integer maxCols)
	{
		this.maxCols = maxCols;
	}

	@Column(name = "LABEL_WIDTH")
	public String getLabelWidth()
	{
		return labelWidth;
	}

	/**
	 * @param labelWidth
	 *            the labelWidth to set
	 */
	public void setLabelWidth(String labelWidth)
	{
		this.labelWidth = labelWidth;
	}

	@Column(name = "TITLE")
	public String getTitle()
	{
		return title;
	}

	/**
	 * @param title
	 *            the title to set
	 */
	public void setTitle(String title)
	{
		this.title = title;
	}

	@Column(name = "TYPE")
	public String getType()
	{
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(String type)
	{
		this.type = type;
	}

	@Column(name = "URL")
	public String getUrl()
	{
		return url;
	}

	/**
	 * @param url
	 *            the url to set
	 */
	public void setUrl(String url)
	{
		this.url = url;
	}

	@Column(name = "ACTION")
	public String getAction()
	{
		return action;
	}

	/**
	 * @param action
	 *            the action to set
	 */
	public void setAction(String action)
	{
		this.action = action;
	}

	@Column(name = "STORE_URL")
	public String getStoreUrl()
	{
		return storeUrl;
	}

	/**
	 * @param storeUrl
	 *            the storeUrl to set
	 */
	public void setStoreUrl(String storeUrl)
	{
		this.storeUrl = storeUrl;
	}

	@Column(name = "LOAD_URL")
	public String getLoadUrl()
	{
		return loadUrl;
	}

	/**
	 * @param loadUrl
	 *            the loadUrl to set
	 */
	public void setLoadUrl(String loadUrl)
	{
		this.loadUrl = loadUrl;
	}

	@Column(name = "PAGE")
	public boolean getPage()
	{
		return page;
	}

	public void setPage(boolean page)
	{
		this.page = page;
	}

	@Column(name = "VIEWWINID")
	public Long getViewwinid()
	{
		return viewwinid;
	}

	/**
	 * @param viewwinid
	 *            the viewwinid to set
	 */
	public void setViewwinid(Long viewwinid)
	{
		this.viewwinid = viewwinid;
	}

	@Column(name = "PARENTCOLUMN")
	public String getParentcolumn()
	{
		return parentcolumn;
	}

	public void setParentcolumn(String parentcolumn)
	{
		this.parentcolumn = parentcolumn;
	}

	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + id.hashCode();
		return result;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ViewPanel other = (ViewPanel) obj;
		if (id != other.id)
			return false;
		return true;
	}
}
